import instance from "@/tools/axios";

//添加
const VipsAdd = async (data: any): Promise<ResponseApiDto> => {
  return instance.post("/Vips/Add", data);
};

//分页
const VipsPagination = async (params: any): Promise<ResponseApiDto> => {
  return instance.get("/Vips/Pagination", params);
};

//删除
const VipsDelete = async (data: any): Promise<ResponseApiDto> => {
  return instance.post("/Vips/Delete", data);
};

//查询Vip
const getVip = async (): Promise<ResponseApiDto> => {
  return instance.get("/Vips/GetVip");
};

//修改
const Update = async (data: any): Promise<ResponseApiDto> => {
  return instance.post("/Vips/Update", data);
};

//单个查询
const Get_dg_Vip = async (params: any): Promise<ResponseApiDto> => {
  return instance.get("/Vips/Get_dg_Vip", params);
};

//套餐ID查VIP和折扣和抵扣
const Get_pak_Vip = async (params: any): Promise<ResponseApiDto> => {
  return instance.get("/Vips/Get_pak_Vip", params);
};

//会员分布图
const echarts_PaginationAsync = async (): Promise<ResponseApiDto> => {
  return instance.get("/Vips/echarts_Pagination");
};

export {
  VipsAdd,
  VipsPagination,
  VipsDelete,
  Update,
  getVip,
  Get_dg_Vip,
  Get_pak_Vip,
  echarts_PaginationAsync,
};
